﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BizCollegeWebApp.Models.User>" %> 

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Profile
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <fieldset>
        <legend>My Profile:</legend>
        <br />
        <!--<div class="display-label">Username</div>-->
        <div class="display-field">
            Username:
            <%: Html.DisplayFor(model => model.Username) %>
        </div>
        <!--<div class="display-label">Password</div>-->
        <div class="display-field">
            Password:
            <%: Html.Label("*********") %>
        </div>
        <!--<div class="display-label">FirstName</div>-->
        <div class="display-field">
            FirstName:
            <%: Html.DisplayFor(model => model.FirstName) %>
        </div>
        <!--<div class="display-label">LastName</div>-->
        <div class="display-field">
            LastName:
            <%: Html.DisplayFor(model => model.LastName) %>
        </div>
        <!--<div class="display-label">Adress</div>-->
        <div class="display-field">
            Address:
            <%: Html.DisplayFor(model => model.Adress) %>
        </div>
        <!--<div class="display-label">City</div>-->
        <div class="display-field">
            City:
            <%: Html.DisplayFor(model => model.City) %>
        </div>
        <!--<div class="display-label">Zip</div>-->
        <div class="display-field">
            ZipCode:
           <!-- <%: (Session["user"] as BizCollegeWebApp.Models.User).Zip %> -->
           <%: Html.DisplayFor(model => model.Zip) %> 
        </div>
        <!--<div class="display-label">Phone</div>-->
        <div class="display-field">
            Phone:
            <%: Html.DisplayFor(model => model.Phone) %>
        </div>
        <!--<div class="display-label">Email</div>-->
        <div class="display-field">
            Email:
            <%: Html.DisplayFor(model => model.Email) %>
        </div>
       </fieldset>
    <p>
        <%: Html.ActionLink("Edit Profile", "Edit","User",new { id=Model.ID }, null) %>
        |
        <!--    <%: Html.ActionLink("Back to List", "Index") %> -->
    </p>
    <%
        IEnumerable<Enrollment> takenCourse = ViewBag.Enrollments;
    %>
    <fieldset>
        <legend>Transcript </legend>
        <table>
            <tr>
                <th>
                    Course Name
                </th>
                <th>
                    Start Date
                </th>
                <th>
                    Completed Date
                </th>
                <th>
                    Status
                </th>
            </tr>
            <%foreach (Enrollment en in takenCourse)
              { %>
            <tr>
                <td>
                    <%: en.Course.CourseName %>
                </td>
                <td>
                    <%: en.StartDate %>
                </td>
                <td>
                    <% if (en.IsCompleted)
                       { %>
                    <%: en.EndDate %>
                    <%} %>
                </td>
                <td>
                    <%: en.IsCompleted? "Completed" : "Uncompleted" %>
                </td>
            </tr>
            <%} %>
        </table>
    </fieldset>
   
</asp:Content>
